<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<head>
    <base href="<%=basePath%>">
    <script src="js/jquery.form.js" type="text/javascript"></script>
    <script src="js/ajaxfileupload.js" type="text/javascript"></script>
    <script>
        function selectBelongingType(typeSelectElement){
            var selectedType = typeSelectElement.value;
            var belongingType = document.getElementById("belongingType");
            belongingType.value = selectedType;
            var $submitLink = $("#submitLink");
            var oldHref =  $submitLink.attr('href');
            if(oldHref && oldHref.indexOf("belongingType={belongingType}") > 0){
                oldHref = oldHref.substring(0, oldHref.indexOf("belongingType={belongingType}") -1);
            }
            if(selectedType && selectedType != ""){
                if(oldHref.indexOf('?') < 0){
                    $submitLink.attr('href', oldHref + '?belongingType={belongingType}');
                }else{
                    $submitLink.attr('href', oldHref + '&belongingType={belongingType}');
                }
            }else{
                $submitLink.attr('href', oldHref);
            }
        }
    </script>
</head>
<div class="pageContent">
        <input type="hidden" id="belongingType" />
        <div class="pageFormContent" layoutH="56">
            <p>
                <label>归属类型选择:</label>
                <select name="belongingType" onchange="selectBelongingType(this);" style="width:180px">
                    <option value="">未选择</option>
                    <c:forEach items="${belongingTypeEnum}" var="belongingType" varStatus="status">
                        <option value="${belongingType.belongingTypeNO}" >${belongingType.description}</option>
                    </c:forEach>
                </select>
            </p>
        </div>
        <div class="formBar">
            <p>
                <a id="submitLink"
                        href="/manage/wallet/pluginCard/beforeUpdateSequence/${clientName}"
                        style="float: right"
                        target="navTab"
                        rel="update_sequence" title="排序" >提交</a>
            </p>
        </div>
</div>
